package com.byit.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.byit.domain.SysLog;
import com.byit.domain.SysRole;
import com.byit.mapper.SysLogMapper;
import com.byit.service.ISysLogService;
import com.byit.utils.PageUtil;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 操作日志记录 服务实现类
 * </p>
 *
 * @author wangx
 * @since 2018-12-21
 */
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements ISysLogService {

    @Override
    public Page<JSONObject> selectLog(Page<SysRole> pageInfo, Map<String, Object> params) {
        List<JSONObject> list =  this.baseMapper.selectLog(pageInfo,params);
        Page<JSONObject> page = PageUtil.transform(pageInfo);
        page.setRecords(list);
        return page;
    }
}
